package com.party.core.service.crowdfund;

import com.party.common.paging.Page;
import com.party.core.model.crowdfund.CrowdfundEvent;
import com.party.core.model.crowdfund.CrowdfundEventCount;
import com.party.core.model.crowdfund.CrowdfundEventWithMemberPartner;
import com.party.core.service.IBaseService;

import java.util.List;
import java.util.Map;

/**
 * 众筹事件服务接口
 * Created by wei.li
 *
 * @date 2017/4/25 0025
 * @time 19:25
 */
public interface ICrowdfundEventService extends IBaseService<CrowdfundEvent> {
    List<CrowdfundEventWithMemberPartner> webListPage(CrowdfundEventWithMemberPartner crowdfundEvent, Map<String, Object> params, Page page);

    List<CrowdfundEvent> listWithParams(CrowdfundEvent crowdfundEvent, Map<String, Object> params);

    /**
     * 是否报名众筹主题
     * @param id 活动编号
     * @param authorId 发布者
     * @return 是否报名(true/false)
     */
    boolean isApplyEvent(String id, String authorId);

    CrowdfundEventCount getEventCountResult(String eventId);


    /**
     * 根据项目id查主题
     * @param targetId
     * @return
     */
    CrowdfundEvent getCorwdfundByActivityId(String targetId);


    /**
     * 根据音频查主题
     * @param crowdfundEvent
     * @return
     */
    List<CrowdfundEvent> findEventByAudio(CrowdfundEvent crowdfundEvent);

    /**
     * @param projectId 众筹id
     * @return
     * @Author yifeng
     * @Description 根据众筹id获取主题信息
     * @Date 10:43 2019/3/28
     **/
    CrowdfundEvent findByProjectId(String projectId);

    /**找到所有多场没有截止的的活动
    * @author      hzq
    * @param
    * @date        2019/4/10 16:54
    */
    List<CrowdfundEvent> getMultipleCrowdfundEvent();

    String getShowAddress(CrowdfundEvent crowdfundEvent);

    List<CrowdfundEvent> getPriceIsNull();
}
